package com.slz3.business.menu;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.reactive.function.server.support.RouterFunctionMapping;

import javax.annotation.Resource;
import java.lang.reflect.Field;

@RunWith(SpringRunner.class)
@SpringBootTest
public class MenuPermissions {
    @Resource
    private ApplicationContext context;

    @Test
    public void test() throws Exception {
        System.out.println(context);
        System.out.println("=====================");
        RouterFunctionMapping bean = context.getBean(RouterFunctionMapping.class);
        Field routerFunction = RouterFunctionMapping.class.getDeclaredField("routerFunction");
        routerFunction.setAccessible(true);
        Object o = routerFunction.get(bean);
        System.out.println(o);
        System.out.println("=====================");

    }
}
